%%This is a very basic article template.
%%There is just one section and two subsections.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,fit}
\pagestyle{empty}
\begin{document}

\begin{tikzpicture}
\tikzstyle{box}=[
	draw,
	rectangle,
	minimum height=15pt,
	style={dashed},
	inner sep=0pt,
	node distance=0pt
]
\tikzstyle{inner-box}=[
	draw,
	rectangle,
	minimum height=15pt,
	inner sep=0pt,
	node distance=0pt
]
\node[
	box,
	minimum width=30pt
](topk) {top 5};
\node[
	below=-1pt of topk
](topk-name) {top-$k$};
\node[
	box,
	right=4pt of topk.east,
	minimum width=60pt
](custom-rule) {middle-aged};
\node[
	above=-1pt of custom-rule
](custom-rule-name) {custom rule};
\node[
	box,
	minimum width=50pt,
	right=4pt of custom-rule.east
](dimension) {customers};
\node[
	below=-1pt of dimension
](dimension-name) {dimension};
\node[
	right=0pt of dimension
](in) {in};
\node[
	box,
	right=0pt of in,
	minimum width=40pt
](context) {my city};
\node[
	above=-1pt of context
](context-name) {context};
\node[
	above=15pt of topk.north,
	inner sep=0pt,
	node distance=0pt
](topk-corner) {};
\path[->,thick] (topk) edge (topk-corner);
\node[
	above=0pt of dimension.north,
	xshift=-12pt,
	inner sep=0pt,
	node distance=0pt
](customer-corner1) {};
\node[
	above=15pt of customer-corner1,
	inner sep=0pt,
	node distance=0pt
](customer-corner2) {};
\path[->,thick] (customer-corner1) edge (customer-corner2);
\node[
	above=0pt of dimension.north,
	xshift=12pt,
	inner sep=0pt,
	node distance=0pt
](customer-corner3) {};
\node[
	above=15pt of customer-corner3,
	inner sep=0pt,
	node distance=0pt
](customer-corner4) {};
\path[->,thick] (customer-corner3) edge (customer-corner4);
\node[
	above=0pt of topk-corner,
	xshift=-5pt,
	inner sep=0pt,
	node distance=0pt
](topk-corner1) {};
\node[
	above=0pt of customer-corner1,
	xshift=5pt,
	inner sep=0pt,
	node distance=0pt
](customer-corner5) {};
\node[
	fit=(topk-corner1)(customer-corner5),
	inner sep=0pt,
	node distance=0pt,
	minimum height=0pt
](order-truncation-fit) {};
\node[
	draw,
	rectangle,
	minimum height=30pt,
	above=0pt of order-truncation-fit.north,
	inner sep=0pt,
	node distance=0pt,
	minimum width=118pt,
](order-truncation) {};
\node[
	inner-box,
	right=6pt of order-truncation.west,
	minimum width=20pt,
	yshift=-5pt
](order) {top};
\node[
	above=-1pt of order.north
](order-name) {\scriptsize [order]};
\node[
	inner-box,
	right=3pt of order.east,
	minimum width=10pt
](nb) {5};
\node[
	above=-1pt of nb.north
](nb-name) {\scriptsize [nb]};
\node[
	inner-box,
	right=3pt of nb.east,
	minimum width=45pt
](dim){customer};
\node[
	above=-1pt of dim.north
](dim-name) {\scriptsize [dimension]};
\node[
	inner-box,
	right=3pt of dim.east,
	minimum width=20pt
](meas){?1};
\node[
	above=-1pt of meas.north
](meas-name){\scriptsize [measure]};
\node[
	above=0pt of order-truncation
](order-truncation-name){order \& truncation};
\node[
	draw,
	rectangle,
	minimum height=30pt,
	right=4pt of order-truncation,
	minimum width=82pt,
	inner sep=0pt,
	node distance=0pt
](basic-query){};
\node[
	inner-box,
	right=6pt of basic-query.west,
	yshift=-5pt,
	minimum width=45pt
](customer){customer};
\node[
	above=-1pt of customer,
](customer-name){\scriptsize [dimension]};
\node[
	inner-box,
	right=3pt of customer,
	minimum width=20pt
](measure){?1};
\node[
	above=-1pt of measure
](measure-name){\scriptsize[measure]};
\node[
	above=0pt of basic-query
](basic-query-name){basic query};
\node[
	below=15pt of context,
	inner sep=0pt,
	node distance=0pt
](context-corner){};
\node[
	draw,
	rectangle,
	minimum height=30pt,
	below=0pt of context-corner,
	xshift=-20pt,
	minimum width=90pt
](value-filter){};
\node[
	inner-box,
	right=6pt of value-filter.west,
	yshift=-5pt,
	minimum width=30pt
](city){city};
\node[
	above=-1pt of city
](city-name){\scriptsize[dimension]};
\node[
	inner-box,
	right=3pt of city,
	minimum width=45pt
](value){Palo Alto};
\node[
	above=-1pt of value
](value-name){\scriptsize[value]};
\node[
	below=0pt of value-filter
](value-filter-name){value filter};
\path[->,thick] (context.south) edge (context-corner);
\node[
	below=15pt of custom-rule,
	inner sep=0pt,
	node distance=0pt
](custom-rule-corner){};
\path[->,thick](custom-rule) edge (custom-rule-corner);
\node[
	draw,
	rectangle,
	minimum height=30pt,
	below=0pt of custom-rule-corner,
	minimum width=100pt
](range-filter){};
\node[
	inner-box,
	right=6pt of range-filter.west,
	yshift=-5pt,
	minimum width=30pt
](age) {age};
\node[
	above=-1pt of age
](age-name){\scriptsize[dimension]};
\node[
	inner-box,
	right=3pt of age,
	minimum width=25pt
](begin){20};
\node[
	above=-1pt of begin
](begin-name){\scriptsize[begin]};
\node[
	inner-box,
	right=3pt of begin,
	minimum width=25pt
](end){30};
\node[
	above=-1pt of end
](end-name){\scriptsize[end]};
\node[
	below=0pt of range-filter
](range-filter-name){range filter};
\node[
	fit=(topk)(range-filter-name)(value-filter),
	inner sep=0pt,
	node distance=0pt
](group){};
\node[
	below=0pt of group,
	xshift=-85pt
](legend){\underline{Legend:}};
\node[
	right=10pt of legend
](legend-1){{\scriptsize[nb]}: nb of items};
\node[
	right=0pt of legend-1.west,
	yshift=-10pt
](legend-2){{\scriptsize[?1]}: unknown artifact};

\end{tikzpicture}

\end{document}




